#include<iostream>
#include<algorithm>
using namespace std;
const int N = 110;
int n, p, q;
int a[N];
int main()
{
	cin >> n >> p >> q;
	for (int i = 1; i <= n; i++)cin >> a[i];
	sort(a + 1, a + n + 1);
	cout << min(p, q + a[1]) << endl;
	return 0;
}